package cn.yy.pojo;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Proof entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "proof", catalog = "phoneerp")
public class Proof implements java.io.Serializable {

	// Fields

	private Integer proofId;
	private Emp emp;
	private String companyName;
	private Date date;
	private String summary;
	private Integer accountInChartId;
	private Double debitAmount;
	private Double creditAmount;
	private Double total;
	private String description;
	private Integer attachmentAmount;

	// Constructors

	/** default constructor */
	public Proof() {
	}

	/** minimal constructor */
	public Proof(String companyName, Date date, String summary,
			Integer accountInChartId, Double total, Integer attachmentAmount) {
		this.companyName = companyName;
		this.date = date;
		this.summary = summary;
		this.accountInChartId = accountInChartId;
		this.total = total;
		this.attachmentAmount = attachmentAmount;
	}

	/** full constructor */
	public Proof(Emp emp, String companyName, Date date, String summary,
			Integer accountInChartId, Double debitAmount, Double creditAmount,
			Double total, String description, Integer attachmentAmount) {
		this.emp = emp;
		this.companyName = companyName;
		this.date = date;
		this.summary = summary;
		this.accountInChartId = accountInChartId;
		this.debitAmount = debitAmount;
		this.creditAmount = creditAmount;
		this.total = total;
		this.description = description;
		this.attachmentAmount = attachmentAmount;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "proofID", unique = true, nullable = false)
	public Integer getProofId() {
		return this.proofId;
	}

	public void setProofId(Integer proofId) {
		this.proofId = proofId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "empID")
	public Emp getEmp() {
		return this.emp;
	}

	public void setEmp(Emp emp) {
		this.emp = emp;
	}

	@Column(name = "companyName", nullable = false, length = 20)
	public String getCompanyName() {
		return this.companyName;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "date", nullable = false, length = 10)
	public Date getDate() {
		return this.date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	@Column(name = "summary", nullable = false, length = 20)
	public String getSummary() {
		return this.summary;
	}

	public void setSummary(String summary) {
		this.summary = summary;
	}

	@Column(name = "account_in_chartID", nullable = false)
	public Integer getAccountInChartId() {
		return this.accountInChartId;
	}

	public void setAccountInChartId(Integer accountInChartId) {
		this.accountInChartId = accountInChartId;
	}

	@Column(name = "debit_amount", precision = 22, scale = 0)
	public Double getDebitAmount() {
		return this.debitAmount;
	}

	public void setDebitAmount(Double debitAmount) {
		this.debitAmount = debitAmount;
	}

	@Column(name = "credit_amount", precision = 22, scale = 0)
	public Double getCreditAmount() {
		return this.creditAmount;
	}

	public void setCreditAmount(Double creditAmount) {
		this.creditAmount = creditAmount;
	}

	@Column(name = "total", nullable = false, precision = 22, scale = 0)
	public Double getTotal() {
		return this.total;
	}

	public void setTotal(Double total) {
		this.total = total;
	}

	@Column(name = "description", length = 20)
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Column(name = "attachmentAmount", nullable = false)
	public Integer getAttachmentAmount() {
		return this.attachmentAmount;
	}

	public void setAttachmentAmount(Integer attachmentAmount) {
		this.attachmentAmount = attachmentAmount;
	}

}